/**
 * Created by Administrator on 2025/5/28.
 * */
#ifndef AIPCNET_ERA
#define AIPCNET_ERA

#include "CudaModule.h"
#include "../GlobalParameters.h"
#include <mutex>
#include <thread>
#include <string>
#include <zmq.hpp>
#include "../include/zy_net.h"

extern "C" BaseObject *createAIPCNet();
extern "C" void destroyAIPCNet(BaseObject *p);

class AIPCNet : public CudaModule {
public:
AIPCNet();

~AIPCNet();

//void onPushCudaOperations(buffer_table_t *input, buffer_table_t *output, cudaStream_t stream) override;
    void onIssueStreamedCudaOperations(buffer_table_t *input, buffer_table_t *output, cudaStream_t stream) override;
private:
    std::string topicAddr = "tcp://192.168.1.115:6001";
    std::string topicName = "MainController";
    zmq::context_t ctx;
    zmq::socket_t sub;
    int prevStep;
};


#endif //TASK1_ERA
